package com.zhangyu.eat.login.model;

import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.os.SystemClock;
import android.provider.MediaStore;
import android.widget.ImageView;

import com.avos.avoscloud.AVException;
import com.avos.avoscloud.AVUser;
import com.avos.avoscloud.LogInCallback;

import java.io.File;

/**
 * Created by SoSho on 2016/10/14.
 */

public class LoginBiz implements IUserLoginBiz {


    @Override
    public void login(final String name, final String pwd, final OnLoginListener listener) {
        AVUser.logInInBackground(name, pwd, new LogInCallback<AVUser>() {
            @Override
            public void done(AVUser avUser, AVException e) {
                if (e == null) {
                    listener.loginSucceed();
                } else {
                    listener.loginFailed();
                }
            }
        });
    }

    @Override
    public void register(ToRegisterListenter listenter) {
        listenter.toRegistered();

    }


}
